<template>
	<view>
		<up-navbar
			:autoBack="true"
			:title="title"
			height="50px"
			placeholder
			:safeAreaInsetTop="true"
			:statusBar="true"
			:titleStyle="`font-size:${titleSize}px;color:#000000e6;`">
			<template #right v-if="showRight">
				<up-text
					:text="Righttext"
					:color="rightColor"
					:size="rightSize"
					@click="rightClick"></up-text>
			</template>
		</up-navbar>
	</view>
</template>

<script setup lang="ts">
import {  watch } from "vue";
const props = withDefaults(
	defineProps<{
		title: string;
		showRight?: boolean;
		Righttext?: string;
		rightColor?: string;
		rightSize?: number;
		titleSize?: number;
	}>(),
	{
		rightColor: "#0084fc",
		rightSize: 12,
		titleSize: 20,
	}
);
const emit = defineEmits(["rightClick"]);
const rightClick = () => {
	emit("rightClick");
};
watch(
	() => props.rightColor,
	(val: any, oldVal) => {
	},
	{ immediate: true, deep: true }
);
</script>

<style lang="scss" scoped>
:deep(.uicon-arrow-left) {
	font-size: 16px !important;
	font-weight: 900 !important;
}
</style>
